﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Activities.Presentation.Model;
using System.Windows;
using System.Windows.Markup;

namespace WFDataBaseProject.Helpers
{
    [MarkupExtensionReturnType(typeof(Visibility))]
    public class VisibilityExtension:MarkupExtension
    {
        private ModelItem modelitem;
        [ConstructorArgument("modelitem")]
        public ModelItem Property { get { return modelitem; } set { modelitem = value; } }

        public VisibilityExtension()
        {

        }

        public VisibilityExtension(ModelItem modelitem)
        {
            this.modelitem = modelitem;
        }
        
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return ProvidedValue(serviceProvider);
        }

        protected Visibility ProvidedValue(IServiceProvider serviceProvider)
        {
            IXamlTypeResolver service = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver;

            if (null!=service)
            {
                  
            }

            return Visibility.Collapsed;
        }
    }
}
